package br.edu.infnet.infraestrutura;

import java.util.Random;

public class CodeGenerate {
	
	static final String AB = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
	static Random rnd = new Random();

	public String randomString( int len ) 
	{
	   StringBuilder sb = new StringBuilder( len );
	   for( int i = 0; i < len; i++ ) 
	      sb.append( AB.charAt( rnd.nextInt(AB.length()) ) );
	   return sb.toString();
	}
	
	public static void main(String[] args) {
		CodeGenerate gen = new CodeGenerate();
		
		String code = gen.randomString(10);
		
		System.out.println("==> " + code);
		
	}

}

